package com.jihu.design.structural.flyweight;

/**
 * 享元模式
 * @author jihu
 * @date 2021/9/26
 */
public class MainTest {

    public static void main(String[] args) {
        AbstractWaitressFlyWeight w1 = ZuDao.getWaitress("");
        w1.service();
        System.out.println(w1);

        AbstractWaitressFlyWeight w2 = ZuDao.getWaitress("");
        w2.service();
        System.out.println(w2);

        w1.end();

        AbstractWaitressFlyWeight w3 = ZuDao.getWaitress("");
        w3.service();
        System.out.println(w3);
    }
}
